trait Person {
    fn name(&self) -> String;
}

trait Student: Person {
    fn university(&self) -> String;
}

trait Programmer {
    fn fav_language(&self) -> String;
}

trait CompSciStudent: Programmer + Student {
    fn git_username(&self) -> String;
}

fn comp_sci_student_greeting(student: &dyn CompSciStudent) -> String {
    format!("My name is {} \n and I attend {}. \n My favorite language is {},\n My Git username is {}",
            student.name(), student.university(), student.fav_language(), student.git_username()
    )
}

struct Human {}

impl Programmer for Human {
    fn fav_language(&self) -> String {
        "java".to_string()
    }
}

impl Student for Human {
    fn university(&self) -> String {
        "YLSD".to_string()
    }
}

impl Person for Human {
    fn name(&self) -> String {
        "name".to_string()
    }
}

impl CompSciStudent for Human {
    fn git_username(&self) -> String {
        "git-un".to_string()
    }
}


fn main() {
    println!("Hello, world!");
    let human = Human {};
    let string = comp_sci_student_greeting(&human);
    println!("{}", string);
}
